package ru.silviasaint.fridge.server.bean;

import java.util.ArrayList;
import java.util.List;

import ru.silviasaint.fridge.server.bean.impl.Substance;
import ru.silviasaint.fridge.shared.bean.SkinnySubstance;

public class SubstanceUtils {
	public static List<? extends SkinnySubstance> convertToSkinny(List<? extends Substance> substances){
		List<SkinnySubstance> skinny = new ArrayList<SkinnySubstance>();
		for (Substance substance: substances){
			skinny.add(substance.convertToSkinny());
		}
		return skinny;
	}
}
